package com.woniuxy.house.service;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import com.woniuxy.entity.house.Building;
import com.woniuxy.entity.house.dto.BuildingDto;
import com.woniuxy.entity.house.dto.BuildingInfoDto;
import com.woniuxy.entity.house.dto.SelectBuildingDto;
import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author liangyu
 * @since 2021-03-19
 */
public interface BuildingService extends IService<Building> {
    //根据楼盘id查询户型然后查询其租房、二手房
    public BuildingDto findDtoByMap(BigDecimal longitude, BigDecimal latitude);

    //新增楼盘
    boolean insertBuilding(Building building);
    //删除楼盘
    boolean deleteBuilding(int id);
    //按地址模糊查询
    Page<Building> findByAddress(int current,int size,String address);
    //按价格模糊查询
    Page<Building> findByPrice(int current,int size,int min,int max);
    //查询所有展示的楼盘信息
    List<BuildingInfoDto> findAllBuilding(int current, int size);
    //条件查询
    List<BuildingInfoDto> findByCondictions(int current, int size, SelectBuildingDto selectBuildingDto);
}
